<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>电影列表-郫县电影</title>
	<link rel="short icon"  href="/photo/head.png"/>
	<style type="text/css">
		.left{    
			    width: 200px;
			    height: 750px;
			    float: left; 
			    background-color: #f4f3f4;
			    text-align: center;
			    border-right: 1px solid #d8d8d8;
		}
		.left h1 {
		    margin-top: 40px;
		    margin-bottom: 30px;
		    font-size: 22px;
		    color: #222;
		    font-weight: 400;
		}
		.right{
			position: absolute;
			left: 225px;
			top: 20px;
			border: 1px solid #d8d8d8;
		}
		body{
			border-top: 2px solid #d8d8d8;
			border-bottom: 2px solid #d8d8d8;
		}
		.left a {
		    display: block;
		    font-weight: 400;
		    color: #333;
		    height: 40px;
		    width: 202px;
		    margin-left: -1px;
		    line-height: 40px;
		    font-size: 18px;
		    text-decoration: none;
		}
		.left .updateMovie{
			color: #9b9191;
		}
		.left .active{
			color: #fff;
    		background-color: #ed3931;
		}
		.left form>input{
			opacity: 0;
			height: 40px;
    		width: 202px;
    		z-index: 1;
		}
		.left .form1{
			position: absolute;
			top:150px;
		}
		.left .form2{
			position: absolute;
			top:190px;
		}
		.right>*{
			margin-left: 10px;
			margin-right: 10px;
		}
		table{
			border-spacing: 4px 10px;	
		}
		.right-top{
			min-height:80px;
			overflow:hidden;
		}	
		
		.right-content{
			border-top: 2px solid #d8d8d8;
		}
		.modle1{
			float:left;
			width: 525px;
			height: 80px;
			text-align:center;
		}
		.modle2{
			float:left;
			width: 900px;
			border-left: 2px solid #d8d8d8;
		}
		.modle1 span{
			position: relative;
			top: 35px;
		}
		.modle2 table{
			margin-left: 90px;
			border-spacing: 70px 10px;
		}
		form .input{
			cursor: pointer;
			border-radius: 5px;
			width: 50px;
		    height: 25px;
		    font-size: 16px;
		    line-height: 25px;
			border: none;
			color: #fff;
			background-color: #ed3931;
		}
		form>input[type=text]{
			height: 20px;
			position: relative;
			top: -2px;
		}
	</style>
</head>
<body>
	<div class="left">
		<h1>影片基本操作</h1>
		<a class="active">基本信息</a>
		<a >添加影片</a>
		<form class="form1" action="/filmInsert" method="get">
				<input type="submit" value="添加影片"/>
		</form>
		<a >删除影片</a>
		<form class="form2" action="/filmDelete" method="get">
			<input type="submit" value="删除影片"/>
		</form>
		<a class="updateMovie">修改影片</a>
	</div>
	<div class="right">
		<div style="height: 10px"></div>
		<div class="right-top">
			<div class="modle1">
				<span>总订单数："${requestScope.OrderNumber }"</span>
			</div>
			<div class="modle2">
				<table>
					<thead>
						<tr >
							<th>时间</th>
							<th>收入</th>
						</tr>
					</thead>
					<tbody>
						
							<c:forEach   items="${requestScope.price }" var="p">
							<tr>
								<td>${p.orderDateString}</td>
								<td>${p.allPrice }</td>
							</tr>
							</c:forEach>			
						

					</tbody>
				</table>
			</div>
		</div>
		<div class="right-content">
			<br>
			<tr>
				<td>
					<form action="/filmFindAll" method="post">
						<input type="text" name="filmName" />
						<input class="input" type="submit" value="搜索" />
					</form>
				</td>
			</tr>
			<table>
				<thead>
					<tr  >
						<th>电影名称</th>
						<th>导演</th>
						<th>封面</th>
						<th>类型</th>
						<th>主演</th>
						<th>国家</th>
						<th>影片时长</th>
						<th>上映时间</th>
						<th>评分</th>
						<th>介绍</th>
						<th>是否热映</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach   items="${requestScope.films }" var="a">
						<tr>		
							<td>${a.filmName }</td>
							<td>${a.director }</td>
							<td><img src=${a.cover }></td>
							<td>${a.type }</td>
							<td>${a.leads }</td>
							<td>${a.country }</td>
							<td style="width:70px">${a.filmLength }分钟</td>
							<td style="width:100px">${a.releaseDateString }</td>
							<td>${a.score }</td>
							<td style="width:350px">${a.introduction }</td>
							<td>${a.reying}</td>
							<td >
								<form action="/filmupdate" method="get">
									<input type="hidden" name="movieId" value="${a.movieId }" />
									<input class="input" type="submit" value="更改"/>
								</form>
							</td>		
							<td >
								<form action="/order/movie" method="get">
									<input type="hidden" name="movieId" value="${a.movieId }" />
									<input class="input" type="submit" value="查看"/>
								</form>
							</td>	
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
	</div>
</body>
</html>